package com.iv.durian.cloud.api.service;

import com.iv.durian.cloud.Content;
import com.iv.durian.cloud.Coverage;
import com.iv.durian.cloud.facade.CoverageFacade;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by LiuLin on 2018/6/30 0030.
 */
@Service
public class CoverageService {
    @Autowired
    private CoverageFacade coverageFacade;
    public List<Coverage> list(Integer type){
        return coverageFacade.list(type);
    }

    public Coverage get(Integer coverageId){
        return coverageFacade.get(coverageId);
    }

    public void add(Coverage coverage){
        coverageFacade.add(coverage);
    }

    public int remove(Integer coverageId){
        return coverageFacade.remove(coverageId);
    }

    public int count(Integer type){
        return coverageFacade.count(type);
    }

    public void update(Coverage coverage){
        coverageFacade.update(coverage);
    }

    public Content getContent(Integer id){
        return coverageFacade.getContent(id);
    }

    public void updateContent(Content content){
        coverageFacade.updateContent(content);
    }
}
